﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="popUpTotalesItem.aspx.vb" Inherits="Interfaz_ModuloAdministracion_popUpTotalesItem" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <script type="text/javascript">
    
        function ValidNum(e) 
        {
        var tecla = document.all ? tecla = e.keyCode : tecla = e.which;
        return ((tecla > 47 && tecla < 58) || tecla == 46);                            
        }
        
         window.onunload=function(){
            window.opener.document.getElementById('ctl00_ContentPlaceHolder1_BtnUpdateCampos').click(); 
        };
        
        function OnCurrencyValueKeyUp(input)
        { 
        if(input.value.toString().length == 1 && input.value.toString() == '0') 
        input.value = input.value.replace('0',''); 

        var num = input.value.replace('.','');
        num = input.value.replace(/\,/g,'');
        if((!isNaN(num)|| num=='-') && num != '-0')
        {
        if(num.indexOf('.') > -1)
        {
        num = num.split('.');
        num[0] = num[0].toString().split('').reverse().join('').replace(/(?=\d*\.?)(\d{3})/g,'$1,').split('').reverse().join('').replace(/^[\,]/,'');
        if(num[1].length > 2)
        {
        num[1] = num[1].substring(0,num[1].length-1);
        }
        input.value = num[0]+'.'+num[1]; 
        }
        else
        {
        input.value = num.toString().split('').reverse().join('').replace(/(?=\d*\.?)(\d{3})/g,'$1,').split('').reverse().join('').replace(/^[\,]/,'') };
        }
        else
        {
        input.value = input.value.substring(0,input.value.length-1);
        }
        input.value = input.value.toString().replace(/\$|\ /g,'');
        input.value = input.value.toString().replace('.','');
        input.value = input.value.toString().replace('-,','-');    
        }

    </script>
    
<link rel="stylesheet" media="screen,projection" type="text/css" href="../Otros/css/main.css" />
    <title>Valores por Item</title>
        
</head>
<body>

    <form id="form1" runat="server">
    <div style="text-align: left">
        <strong><span style="font-size: 11pt">
        </span><span style="font-size: 8pt">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;
            &nbsp; &nbsp; &nbsp;
            TOTALES A COBRAR ITEM:</span></strong><asp:Label ID="LblItem" runat="server" Font-Bold="True"
                Font-Names="Verdana" Font-Size="8pt" ForeColor="#CC0000" Text="Label"></asp:Label><strong><span
                    style="font-size: 8pt"> </span></strong><strong><span style="font-size: 8pt">PRESUPUESTO:</span></strong><asp:Label
                        ID="LblPresu" runat="server" Font-Bold="True" Font-Names="Verdana" Font-Size="8pt"
                        ForeColor="#CC0000" Text="Label"></asp:Label></div><table style="border-right: lightblue thin solid; border-top: lightblue thin solid;
            border-left: lightblue thin solid; width: 100%; border-bottom: lightblue thin solid;
            background-color: white">
        <tr>
            <td style="height: 257px; width: 953px;" >
                <table style="border-right: lightblue thin solid; border-top: lightblue thin solid;
            border-left: lightblue thin solid; width: 100%; border-bottom: lightblue thin solid;
            background-color: white">
                    <tr>
                        <td colspan="3" rowspan="1" style="text-align: left">
                            <strong><span style="text-decoration: underline">ACTIVIDADES</span></strong></td>
                    </tr>
                    <tr>
                <td colspan="" rowspan="">
                    Total Actividades</td>
                <td colspan="" rowspan="" style="width: 5px">
                    :</td>
                <td colspan="" rowspan="">
                    <strong>$ </strong>
                    <asp:Label ID="LblTotalActividades" runat="server" Font-Bold="True"></asp:Label></td>
                    </tr>
                    <tr>
                                <td>
                                    Cantidad</td>
                                <td style="width: 5px">
                                    <strong>:</strong></td>
                                <td style="font-weight: bold;">
                                    $
                                    <asp:Label ID="LblCantidadActividad" runat="server" Font-Bold="True"></asp:Label></td>
                    </tr>
                    <tr>
                <td>
                    SubTotal Actividad</td>
                <td style="width: 5px">
                    :</td>
                <td>
                    <strong>$ </strong>
                    <asp:Label ID="LblSubTotalActividad" runat="server" Font-Bold="True"></asp:Label></td>
                    </tr>
                    <tr>
                <td>
                    <asp:Label ID="lblporGastosGrlsAct" runat="server" Font-Bold="True" ForeColor="#CC0000"
                        Text="Label"></asp:Label>
                    % Gastos Generales</td>
                <td style="width: 5px">
                    :</td>
                <td>
                    <strong>$ </strong>
                    <asp:Label ID="LblGastosGeneralesAct" runat="server" Font-Bold="True"></asp:Label></td>
                    </tr>
                    <tr>
                <td>
                    <asp:Label ID="LblporcUtilidadAct" runat="server" Font-Bold="True" ForeColor="#CC0000"
                        Text="Label"></asp:Label>% Utilidad</td>
                <td style="width: 5px">
                    :</td>
                <td>
                    <strong>$ </strong>
                    <asp:Label ID="LblUtilidadesAct" runat="server" Font-Bold="True"></asp:Label></td>
                    </tr>
                    <tr>
                <td>
                    <asp:Label ID="LblporDescuentoAct" runat="server" Font-Bold="True" ForeColor="#CC0000"
                        Text="Label"></asp:Label>% Descuento</td>
                <td style="width: 5px">
                    :</td>
                <td>
                    <strong>$ -</strong><asp:Label ID="LblDescuentoAct" runat="server" Font-Bold="True"
                        ForeColor="#CC0000"></asp:Label></td>
                    </tr>
                    <tr>
                <td>
                    Total Neto Actividad</td>
                <td style="width: 5px">
                    :</td>
                <td>
                    <strong>$ </strong>
                    <asp:Label ID="LblTotalnetoActivdad" runat="server" Font-Bold="True"></asp:Label></td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                        <td style="width: 5px">
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>
                            Total a Cobrar Actividad</strong></td>
                        <td style="width: 5px">
                            :</td>
                        <td>
                            <strong>$</strong>
                    <asp:TextBox ID="TxtTotalCobrarAct" runat="server" Font-Bold="True" Width="86px">0</asp:TextBox>
                    <asp:Button ID="BtnGuardarAct" runat="server" Font-Bold="True" OnClientClick="return confirm('Esta seguro de guardar el nuevo valor');"
                        Text="Guardar" Width="70px" /></td>
                    </tr>
                    <tr>
                        <td colspan="3" style="text-align: center">
                            &nbsp;<asp:Panel ID="PanelAct" runat="server" ScrollBars="Both" Width="80%" Height="200px">
                            <asp:GridView ID="GridActividad" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                CellPadding="4" CssClass="mGrid" ForeColor="#333333" GridLines="None" Width="100%">
                                <RowStyle BackColor="#EFF3FB" />
                                <Columns>
                                    <asp:BoundField DataField="ID" HeaderText="Id">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="ACTIVIDAD" HeaderText="Actividad" ReadOnly="True">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="CANTHORAS" HeaderText="Cantidad Horas">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="VALORHH" HeaderText="Valor H.H.">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="FACTORHH" HeaderText="Factor H.H.">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="DESCRIPCION" HeaderText="Descripcion">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="TOTALNETO" HeaderText="Total Neto">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="PRIOR" HeaderText="Prioridad">
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:BoundField>
                                </Columns>
                            </asp:GridView>
                            </asp:Panel>
                        </td>
                    </tr>
                </table>
                </td>
        </tr>
                            <tr>
                                <td style="height: 257px; width: 953px;">
                                    <table style="border-right: lightblue thin solid; border-top: lightblue thin solid;
            border-left: lightblue thin solid; width: 100%; border-bottom: lightblue thin solid;
            background-color: white">
                                        <tr>
                                            <td colspan="3" rowspan="1" style="text-align: left">
                                                <strong><span style="text-decoration: underline">MATERIALES</span></strong></td>
                                        </tr>
                <tr>
                 <td colspan="" rowspan="">
                    Total Materiales</td>
                <td style="width: 5px">
                    :</td>
                <td style="width: 556px">
                    <strong>$ </strong>
                    <asp:Label ID="LblTotalMateriales" runat="server" Font-Bold="True"></asp:Label></td>
                </tr>
                <tr>
                <td>
                    Cantidad</td>
                <td style="width: 5px">
                    <strong>:</strong></td>
                <td style="font-weight: bold; width: 556px;">
                    <strong>$ 
                        <asp:Label ID="LblCantidadMat" runat="server" Font-Bold="True"></asp:Label></strong></td>
                </tr>
                <tr>
                                <td>
                                    SubTotal Material</td>
                                <td style="width: 5px">
                                    <strong>:</strong></td>
                                <td style="font-weight: bold; width: 556px;">
                                    $
                    <asp:Label ID="LblSubTotalmat" runat="server" Font-Bold="True"></asp:Label></td>
                </tr>
                <tr >
                <td>
                    <asp:Label ID="lblporGastosGrlsMat" runat="server" Font-Bold="True" ForeColor="#CC0000"
                        Text="Label"></asp:Label>
                    % Gastos Generales</td>
                <td style="width: 5px">
                    :</td>
                <td style="width: 556px">
                    <strong>$</strong>
                    <asp:Label ID="LblGastosGeneralesMat" runat="server" Font-Bold="True"></asp:Label></td>
                </tr>
                <tr>
                <td>
                    <asp:Label ID="LblporcUtilidadMat" runat="server" Font-Bold="True" ForeColor="#CC0000"
                        Text="Label"></asp:Label>% Utilidad</td>
                <td style="width: 5px">
                    :</td>
                <td style="width: 556px">
                    <strong>$ </strong>
                    <asp:Label ID="LblUtilidadesMat" runat="server" Font-Bold="True"></asp:Label></td>
                </tr>
                <tr>
                <td>
                    <asp:Label ID="lblUtilidadMateriales" runat="server" Font-Bold="True" Text="Label" ForeColor="#CC0000"></asp:Label>%
                    Utilidad Materiales</td>
                <td style="width: 5px">
                    :</td>
                <td style="width: 556px">
                    <strong>$ </strong>
                    <asp:Label ID="LblUtilidadMaterialesMat" runat="server" Font-Bold="True"></asp:Label></td>
                </tr>
                <tr>
                <td>
                    <asp:Label ID="LblporDescuentoMat" runat="server" Font-Bold="True" ForeColor="#CC0000"
                        Text="Label"></asp:Label>% Descuento</td>
                <td style="width: 5px">
                    :</td>
                <td style="width: 556px">
                    <strong>$</strong> -<asp:Label ID="LblDescuentoMat" runat="server" Font-Bold="True"
                        ForeColor="#CC0000"></asp:Label></td>
                </tr>
                <tr>
                <td>
                    <strong>Total Neto Material</strong></td>
                <td style="width: 5px">
                    :</td>
                <td style="width: 556px">
                    <strong>$&nbsp;</strong>
                    <asp:Label ID="LblTotalnetoMat" runat="server" Font-Bold="True"></asp:Label></td>
                </tr>
                                        <tr>
                                            <td>
                                            </td>
                                            <td style="width: 5px">
                                            </td>
                                            <td style="width: 556px">
                                            </td>
                                        </tr>
            <tr>
                <td>
                    <strong>Total a Cobrar Material</strong></td>
                <td style="width: 5px">
                    :</td>
                <td style="width: 556px">
                    <strong>$</strong>
                    <asp:TextBox ID="TxtTotalCobrarMat" runat="server" Font-Bold="True" Width="86px">0</asp:TextBox><strong>
                    </strong>
                    <asp:Button ID="BtnGuardarMat" runat="server" Font-Bold="True" OnClientClick="return confirm('Esta seguro de guardar el nuevo valor');"
                        Text="Guardar" Width="70px" /></td>
            </tr>
                                        <tr>
                                            <td colspan="3" style="text-align: center">
                                                &nbsp;<asp:Panel ID="PanelMat" runat="server" ScrollBars="Both" Width="80%" Height="200px">
                                                <asp:GridView ID="GridMaterial" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                                    CellPadding="4" CssClass="mGrid" ForeColor="#333333" GridLines="None" Width="100%">
                                                    <RowStyle BackColor="#EFF3FB" />
                                                    <Columns>
                                                        <asp:BoundField DataField="ID" HeaderText="Id">
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="ITEM" HeaderText="Item">
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="CANTIDAD" HeaderText="Cantidad">
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="DESCRIPCION" HeaderText="Descripcion">
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="VALORKG" HeaderText="Valor Kg.">
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="TOTNETO" HeaderText="Total Neto">
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </asp:BoundField>
                                                    </Columns>
                                                </asp:GridView>
                                                </asp:Panel>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="3" style="text-align: center">
                                                <asp:Label ID="LblError" runat="server"></asp:Label></td>
                                        </tr>
            </table>
                                </td>
                            </tr>
                            <tr>
                                <td style="height: 257px">
                                </td>
                            </tr>
    </table>
   
    </form>
</body>
</html>
